package fristphase.day9_03.ooday04;

public class Test {
    public static void main(String[] args) {
        /*
        System.out.println("第一次");
        Loo o1 = new Loo();
        System.out.println("第二次");
        Loo o2 = new Loo();
        System.out.println("第三次");
        Moo o3 = new Moo();
        */
/*
        System.out.println("第一次");
        Moo o4 = new Moo();
        System.out.println("第二次");
        Moo o5 = new Moo();
        System.out.println("第三次");
        Moo o6 = new Moo();
*/

        System.out.println("第一次");
        Noo o7 = new Noo();
        System.out.println("第二次");
        Noo o8 = new Noo();
        System.out.println("第三次");
        Noo o9 = new Noo();

    }
}

class Moo extends Loo{
    static {
        System.out.println("派生类静态块");
    }
    {
        System.out.println("派生类语句块");
    }
    Moo(){
        System.out.println("派生类构造方法");
    }
}
class Loo{
    static {
        System.out.println("超类静态块");
    }
    {
        System.out.println("超类语句块");
    }
    Loo(){
        System.out.println("超类构造方法");
    }
}
class Noo{
    static {
        System.out.println("静态块");
    }
    {
        System.out.println("语句块");
    }
    Noo(){
        System.out.println("构造方法");
    }
}
